﻿namespace AutoRevit.Entry.Command;

/// <summary>
/// 处理拦截器
/// </summary>
public class LiteHandlerInterceptor : IExternalCommandInterceptor
{
    private readonly Func<IRevitData, HandlerResult> _handle;

    /// <summary>
    /// 
    /// </summary>
    /// <param name="handle"></param>
    public LiteHandlerInterceptor(Func<IRevitData, HandlerResult> handle)
    {
        _handle = handle;
    }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="revitData"></param>
    /// <returns></returns>
    public HandlerResult Handle(IRevitData revitData)
    {
        return _handle(revitData);
    }
}
